package com.ruoyi.delivery.controller;

import com.ruoyi.delivery.domain.DelAllocationDetail;
import com.ruoyi.delivery.service.IDelAllocationDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 调拨单明细 控制层
 *
 * @author oasis
 */
@RestController
@RequestMapping("/delivery/allocationDetail")
public class DelAllocationDetailController {

    @Autowired
    private IDelAllocationDetailService allocationDetailService;

    /**
     * 根据 allocationNo 获取所有调拨明细
     * @param allocationNo 调拨编号
     * @return 调拨明细列表
     */
    @RequestMapping
    public List<DelAllocationDetail> getDetailsByAllocationNo(@RequestParam String allocationNo) {
        System.out.println("getDetailsByAllocationNo: "+allocationNo);
        return allocationDetailService.getDetailsByAllocationNo(allocationNo);
    }
}
